package org.pz.service;

import org.pz.entity.MallResult;
import org.pz.mq.ScheduleProduct;
import org.pz.vo.TaskVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ScheduleServiceImpl implements ScheduleService{

    @Autowired
    private ScheduleProduct scheduleProduct;

    @Override
    public void addCronJob(TaskVo task) {
        switch(task.getType()){
            case BEAN:

                scheduleProduct.sendMessage(task);

                break;
            case HTTP:

        }
    }

    @Override
    public MallResult updateCronJob(TaskVo taskVo) {
        return null;
    }

    @Override
    public MallResult pauseCronJob(TaskVo taskVo) {
        return null;
    }

    @Override
    public MallResult resumeCronJob(TaskVo taskVo) {
        return null;
    }

    @Override
    public MallResult deleteCronJob(TaskVo taskVo) {
        return null;
    }

}
